package string.classwork;

public class tchesdemo {
    public static void main(String[] args) {
        String email ="chen@qq.com";
        String regex="[a-zA-Z0-9]+@+[a-zA-Z]+(\\.[a-zA-Z]+)+";
        boolean b=email.matches(regex);
        if(b){
            System.out.println("格式正确");
        }else{
            System.out.println("格式错误");
        }
    }
}
